<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  
  <script>
    // 3、将以下字符串中的文件名提取并打印出来
let str = "C:\\Users\\34852\\Desktop\\百度同步\\BaiduSyncdisk\\课程\\05-JavaScript进阶\\JavaScript进阶v8.0配套资料\\JavaScript进阶第二天\\04-code\\index.html";

  const arr=str.split('\\')
  document.querySelector('body').innerHTML=arr[arr.length-1]
  </script>
</body>
</html>